﻿using MediatR;
using SystemHYS.API.Application.command.GualityGroupCommand;
using SystemHYS.Domian;
using SystemHYS.Infrstructre.Interface;
namespace SystemHYS.API.Application.commandler.GualityGroupCommandler
{
    public class GualityGroupModelCommandler:IRequestHandler<GualityGroupModelCommand,GualityGroup>
    {
        IGualityGroupRepository GroupRepository;
        public GualityGroupModelCommandler(IGualityGroupRepository GroupRepository)
        {
            this.GroupRepository = GroupRepository;
        }

        public async Task<GualityGroup> Handle(GualityGroupModelCommand request, CancellationToken cancellationToken)
        {
            return await GroupRepository.GetModelAsnc(request.gualityGroupId);
        }
    }
}
